package com.cloud.wms.ui.in.entity;

import java.util.List;

/**
 * @Author:Chen
 * @Date: 2021-01-28 21:58
 * @Description:
 */
public class TaskDetailEntity {

    /**
     * inId : 3601
     * inCode : RCG901190720000008
     * inType : 1
     * skuQty : 2
     * commodityQty : 2000
     * createdAt : 2019-07-20T23:04:13
     * details : [{"commodityId":1574601,"commodityName":"","productBatchCode":"''","stockTypek":1,"planQty":1000,"unitName":"件"},{"commodityId":1574701,"commodityName":"","productBatchCode":"''","stockTypek":1,"planQty":1000,"unitName":"件"}]
     */

    private long inId;
    private String inCode;
    private String inType;
    private String skuQty;
    private String commodityQty;
    private String createdAt;
    private List<DetailsBean> details;

    public long getInId() {
        return inId;
    }

    public void setInId(long inId) {
        this.inId = inId;
    }

    public String getInCode() {
        return inCode == null ? "" : inCode;
    }

    public void setInCode(String inCode) {
        this.inCode = inCode;
    }

    public String getInType() {
        return inType == null ? "" : inType;
    }

    public void setInType(String inType) {
        this.inType = inType;
    }

    public String getSkuQty() {
        return skuQty == null ? "" : skuQty;
    }

    public void setSkuQty(String skuQty) {
        this.skuQty = skuQty;
    }

    public String getCommodityQty() {
        return commodityQty == null ? "" : commodityQty;
    }

    public void setCommodityQty(String commodityQty) {
        this.commodityQty = commodityQty;
    }

    public String getCreatedAt() {
        return createdAt == null ? "" : createdAt.replace("T", " ");
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public List<DetailsBean> getDetails() {
        return details;
    }

    public void setDetails(List<DetailsBean> details) {
        this.details = details;
    }

    public static class DetailsBean {
        /**
         * commodityId : 1574601
         * commodityName :
         * productBatchCode : ''
         * stockTypek : 1
         * planQty : 1000
         * unitName : 件
         */

        private long commodityId;
        private String commodityName;
        private String productBatchCode;
        private int stockTypek;
        private String planQty;
        private String unitName;

        public String getStockTypeName() {
            switch (stockTypek){
                case 1:
                    return "良";
                case 2:
                    return "次";
                case 3:
                    return "废";
            }
            return "良";
        }

        public long getCommodityId() {
            return commodityId;
        }

        public void setCommodityId(long commodityId) {
            this.commodityId = commodityId;
        }

        public String getCommodityName() {
            return commodityName == null ? "" : commodityName;
        }

        public void setCommodityName(String commodityName) {
            this.commodityName = commodityName;
        }

        public String getProductBatchCode() {
            return productBatchCode == null ? "" : productBatchCode;
        }

        public void setProductBatchCode(String productBatchCode) {
            this.productBatchCode = productBatchCode;
        }

        public int getStockTypek() {
            return stockTypek;
        }

        public void setStockTypek(int stockTypek) {
            this.stockTypek = stockTypek;
        }

        public String getPlanQty() {
            return planQty == null ? "" : planQty;
        }

        public void setPlanQty(String planQty) {
            this.planQty = planQty;
        }

        public String getUnitName() {
            return unitName == null ? "" : unitName;
        }

        public void setUnitName(String unitName) {
            this.unitName = unitName;
        }
    }
}
